import java.util.LinkedList;

/**
 * A structure that behaves like a queue but implements the Structure interface
 * Feel free to build on existing java implementations, no need to build from
 * scratch. (you can import and use something like LinkedList for example)
 *
 * @param <T>
 */
public class StructureQueue<T> implements Structure<T> {

    LinkedList<T> data = new LinkedList<T>();

    @Override
    public boolean isEmpty()
    {
        return this.data.isEmpty();
    }

    @Override
    public void clear()
    {
        this.data.clear();
    }

    @Override
    public void add(T node)
    {
        this.data.add(node);
    }

    @Override
    public T remove()
    {
        return this.data.removeFirst();
    }

}
